Column

nyc_inspections_df <- nyc_inspections |> 
  mutate(boro = case_when(boro == 0 ~ NA, 
                          TRUE ~ boro), 
         critical_flag = case_when(critical_flag == "Not Applicable" ~ NA, 
                          TRUE ~ critical_flag), 
         inspection_date = case_when(inspection_date == "1900-01-01T00:00:00.000" ~ NA, 
                          TRUE ~ inspection_date),
         latitude = case_when(latitude == "0" ~ NA, 
                              TRUE ~ as.numeric(latitude)), 
         longitude =  case_when(longitude == "0" ~ NA, 
                              TRUE ~ as.numeric(longitude)), 
         score = as.numeric(score))

Chart A: Average number of inspections per restaurant

## `summarise()` has grouped output by 'camis', 'longitude'. You can override
## using the `.groups` argument.

Column

Chart B

Chart C